package com.qhnu.zxjx.context;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("用户上下文")
public class UserContext {
	@ApiModelProperty("用户")
	private String userId;

	@ApiModelProperty("用户名")
	private String userName;

	@ApiModelProperty("token")
	private String token;

	public String getUserId() {
		return userId == null ? "system" : userId;
	}

	public String getUserName() {
		return userName == null ? "system" : userName;
	}

	public String getToken() {
		return token;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public void setToken(String token) {
		this.token = token;
	}

	@Override
	public String toString() {
		return "UserContext [userId=" + userId + ", userName=" + userName + ", token=" + token + "]";
	}
}
